import React from 'react'
import { NavLink, Outlet } from 'react-router-dom'

export default function Home() {
  return (
    <div>
      <h2>Home</h2>
      <ul className="nav nav-tabs">
        <li>
          <NavLink className="list-group-item" to="news">News</NavLink>
        </li>
        <li>
          <NavLink className="list-group-item" to="/home/message">Message</NavLink>
        </li>
      </ul>
      <hr/>
      {/* 显示子路由组件 */}
      <Outlet/>
    </div>
  )
}
